package com.example.demospringmybatisplus.entity;

/**
 * 人员
 *
 * @DATE 2024/5/15
 **/
public class Person {

    private final String name;

    public Person(String name) {
        this.name = name;
    }

    public void create() {
        System.out.println("ThreadName:" + Thread.currentThread().getName() + " 对象:" + name + "正在被创建。。。。。。");
    }

    public void destroy() {
        System.out.println("ThreadName:" + Thread.currentThread().getName() + " 对象:" + name + "正在被销毁。。。。。。");
    }

    public boolean isValid() {
        System.out.println("ThreadName:" + Thread.currentThread().getName() + " 对象" + name + "正在检验是否可用。。。。。。");
        return true;
    }
}
